<?php 
	require_once dirname(__FILE__) . "/../../includes/config.php";
	require_once PHP_ROOTPATH.'/classes/database.php';
	
	//récupération des noms à mettre dans les onglets
	header("Content-Type: text/xml; charset=utf-8");
	echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
	echo "<list>";
	 
	$id_connect=Database::getInstance();
	
	$query_temp = "SELECT DISTINCT(label), id_type_test FROM Type_test WHERE label NOT LIKE 'Pesée' AND label NOT LIKE 'IRM' AND label NOT LIKE 'Test immunologique'
	AND label NOT LIKE 'Séquencage' AND label NOT LIKE 'Génotypage' AND label NOT LIKE 'Test biologique' AND label NOT LIKE 'Test induction' 
	AND label NOT LIKE 'Test comportemental' ORDER BY id_type_test";

	$res_query = pg_query($id_connect , $query_temp) or die(pg_last_error());
	$i=0;
	while ($back = pg_fetch_assoc($res_query)) {
		echo "<item id=\"" . $i . "\" name=\"" . $back["label"] . "\" />";
		$i++;
	}
									
	echo "</list>";

?>
